<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
</head>
<body>
<div class="main">
    <div class="title">
        <span>密码登录</span>
    </div>

    <div class="title-msg">
        <span>请输入登录账户和密码</span>
    </div>

    <form class="login-form" method="post" novalidate th:action="@{/login}">
        <!--输入框-->
        <div class="input-content">
            <!--autoFocus-->
            <div>
                <input type="text"
                       autocomplete="off"
                       placeholder="用户名"
                       name="name"
                       required/>
            </div>

            <div style="margin-top: 16px">
                <input type="password"
                       autocomplete="off"
                       placeholder="登录密码"
                       name="password"
                       required
                       maxlength="100"/>
            </div>
            <div style="display: flex;margin-top: 16px">
                <!-- 新增图形验证码的输入框 -->
                <input type="text" name="captcha" placeholder="captcha" />
                <!-- 图片指向图形验证码API -->
                <img src="/captcha.jpg" alt="captcha" height="50px" width="150px" style="margin-left: 20px;">
            </div>
            <div>
                <input type="checkbox"
                       name="remember-me"
                       autocomplete="off"
                       style="width:auto;">
                <span> Remember me on this computer</span>
            </div>
        </div>

        <!--登入按钮-->
        <div style="text-align: center">
            <button type="submit" class="enter-btn" >登录</button>
        </div>
    </form>

</div>
</body>
<style>
  body{
    background: #426258;
  }
  *{
    padding: 0;
    margin: 0;
  }

  .main {
    padding-left: 25px;
    padding-right: 25px;
    padding-top: 15px;
    width: 350px;
    height: 380px;
    background: #FFFFFF;
    /*以下css用于让登录表单垂直居中在界面,可删除*/
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -175px auto 0 -175px;
  }

  .title {
    width: 100%;
    height: 40px;
    line-height: 40px;
  }

  .title span {
    font-size: 18px;
    color: #353f42;
  }

  .title-msg {
    width: 100%;
    height: 64px;
    line-height: 64px;
  }

  .title:hover{
    cursor: default	;
  }

  .title-msg:hover{
    cursor: default	;
  }

  .title-msg span {
    font-size: 12px;
    color: #707472;
  }

  .input-content {
    width: 100%;
    height: 220px;
  }

  .input-content input {
    width: 330px;
    height: 40px;
    border: 1px solid #dad9d6;
    background: #ffffff;
    padding-left: 10px;
    padding-right: 10px;
  }

  .enter-btn {
    width: 350px;
    height: 40px;
    color: #fff;
    background: #0bc5de;
    line-height: 40px;
    text-align: center;
    border: 0px;
  }

  .enter-btn:hover {
    cursor:pointer;
    background: #1db5c9;
  }
</style>

</html>